$OpenBSD: patch-xlHtml_nsxlview,v 1.1.1.1 2001/07/13 15:16:22 avsm Exp $
--- xlHtml/nsxlview.orig	Sun Dec 26 20:39:05 1999
+++ xlHtml/nsxlview	Fri Jul 13 12:30:05 2001
@@ -1,4 +1,4 @@
-#!/bin/tcsh
+#!/bin/csh
 
 if ($#argv != 1) then
     echo "Usage: $0 file.xls"
@@ -9,12 +9,13 @@ set source = $argv[1]
 
 #Generate a unique html filename (/tmp/scriptname.pidnum.html)
 set com = $0
-set tmp = /tmp/$com:t.$$
-set html = $tmp.html
+set tmp = `mktemp -d /tmp/nsxlview.XXXXXXXXXX` || exit 1
+set tmp2 = `mktemp -d $tmp/nsxlview.XXXXXXXXXX` || exit 1
+set html = $tmp2.html
 
 xlHtml -a $source > $html
-if ((!(-s $html)) | ($status)) then
-    echo "$0: failed to generate HTML file"
+if ((!(-r $html)) | ($status)) then
+    echo "$0"": failed to generate HTML file"
     exit 1
 endif
 
@@ -24,6 +25,6 @@ nsopen $html
 #I remove the html file for security reasons. If you want to be able
 #to click on the "Back" button without getting a "file not found"
 #error - comment the next line.
-rm -f $tmp*
+rm -rf $tmp
 
 exit 0
